<%--
  Created by IntelliJ IDEA.
  User: xltx
  Date: 2022/7/13
  Time: 19:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
    <title>show</title>
    <link rel="stylesheet" href="../../layui/css/layui.css">
</head>
<body>
<div class="layui-container">
    <div class="layui-row">
        <div class="layui-col-md12">
            <div class="page-header">
                <h1>基于ssm实现简单的增删改查</h1>
            </div>
        </div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md12">
            <div class="page-header">
                <h1><small>
                    用户展示界面
                </small></h1>
            </div>
        </div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md4">
            <a class="layui-btn" href="/user/toAddUser">新增</a>
        </div>
    </div>
    <div class="layui-row">
        <div class="layui-col-md12">
            <table class="layui-table">
                <thead>
                <tr>
                    <th>id</th>
                    <th>用户名</th>
                    <th>密码</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <c:forEach varStatus="status" var="user" items="${requestScope.get('list')}">
                    <tr>
                        <td>${user.id}</td>
                        <td>${user.username}</td>
                        <td>******</td>
                        <td>
                            <div class="layui-btn-group">
                                <a class="layui-btn" href="/user/toUpdate?id=${user.id}">修改</a>
                                <a class="layui-btn" href="/user/del/${user.id}">删除</a>
                            </div>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
    </div>

</div>
</body>
</html>
